//package com.zmn.plat.dubbo.impl.product.productgroup;
//
//import java.util.List;
//import java.util.stream.Collectors;
//
//import javax.annotation.Resource;
//import javax.validation.constraints.NotEmpty;
//import javax.validation.constraints.Size;
//
//import org.apache.dubbo.config.annotation.Service;
//
//import com.zmn.common.dto2.ResponseDTO;
//import com.zmn.common.utils.collection.CollectionUtil;
//import com.zmn.manager.common.database.annotation.ReadOnlyConnection;
//import com.zmn.plat.common.dictionary.PlatErrorCodeDict;
//import com.zmn.plat.common.dto.product.productgroup.EngineerExamineUrlDRO;
//import com.zmn.plat.dubbo.interfaces.product.productgroup.EngineerExamineUrlListRemoteService;
//import com.zmn.plat.dubbo.utils.DubboConsts;
//import com.zmn.plat.model.entity.product.engineerexamineurl.EngineerExamineUrl;
//import com.zmn.plat.model.entity.product.engineerexamineurl.EngineerExamineUrlQuery;
//import com.zmn.plat.services.interfaces.product.engineerexamineurl.EngineerExamineUrlService;
//
//import io.swagger.annotations.Api;
//import lombok.extern.slf4j.Slf4j;
//
///**
// * 产品组工程师考试链接远程服务实现类
// *
// * @auther: tanghongjun
// * @since: 2020年9月8日14:32:19
// */
//@Service(version = DubboConsts.INTERFACE_VERSION, validation = "true")
//@Api(value = "产品组工程师考试链接远程服务", tags = {"工程师考试链接"})
//@Slf4j
//public class EngineerExamineUrlListRemoteServiceImpl implements EngineerExamineUrlListRemoteService {
//
//    @Resource
//    EngineerExamineUrlService engineerExamineUrlService;
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<List<EngineerExamineUrlDRO>> listByGroupIdList(@NotEmpty(message = "groupIdList参数不能为空且个数不能超过" + DubboConsts.MAX_PARAM_LENGTH) @Size(min = 1, max = DubboConsts.MAX_PARAM_LENGTH,
//        message = "groupIdList参数不能为空且个数不能超过" + DubboConsts.MAX_PARAM_LENGTH) List<Integer> groupIdList) {
//        log.info("listByGroupIdList：groupIdList={}", groupIdList);
//
//        EngineerExamineUrlQuery query = new EngineerExamineUrlQuery();
//        query.setGroupIdList(groupIdList);
//        List<EngineerExamineUrl> engineerExamineUrlList = engineerExamineUrlService.listByQuery(query);
//
//        if (CollectionUtil.isNullOrEmpty(engineerExamineUrlList)) {
//            log.error("当前产品组没有配置考试信息,query={},errorCode:{}", query, PlatErrorCodeDict.ERROR_CODE_PRODUCT_GROUP_NO_TEST_MSG);
//            return ResponseDTO.fromErrorCodeTable(PlatErrorCodeDict.ERROR_CODE_PRODUCT_GROUP_NO_TEST_MSG);
//        }
//
//        List<EngineerExamineUrlDRO> dros = engineerExamineUrlList.stream().map(engineerExamineUrl -> new EngineerExamineUrlDRO(engineerExamineUrl.getGroupId(), engineerExamineUrl.getPrimaryLeaveUrl(),
//            engineerExamineUrl.getMiddleRankUrl(), engineerExamineUrl.getTheSeniorUrl(), engineerExamineUrl.getTheSuperUrl(), engineerExamineUrl.getTheChiefUrl())).collect(Collectors.toList());
//
//        return ResponseDTO.success(dros);
//    }
//}
